// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.common.model.PageSearch;
import com.fowo.api.entity.PurchaseReport;
import com.fowo.api.model.purchase.report.PurchaseReportBuyerParams;
import com.fowo.api.model.purchase.report.PurchaseReportBuyerResult;
import com.fowo.api.model.purchase.report.PurchaseReportItemVo;
import com.fowo.api.model.purchase.report.PurchaseReportProductParams;
import com.fowo.api.model.purchase.report.PurchaseReportProductResult;
import com.fowo.api.model.purchase.report.PurchaseReportSearchParamPo;
import com.fowo.api.model.purchase.report.PurchaseReportSupplierParams;
import com.fowo.api.model.purchase.report.PurchaseReportSupplierResult;
import com.fowo.api.model.purchase.report.PurchaseReportVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PurchaseReportMapper extends BaseMapper<PurchaseReport> {
  Page<PurchaseReportItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") PurchaseReportSearchParamPo search
  );
  List<OptionItem<PurchaseReportItemVo>> searchOptions(
    @Param("search") PurchaseReportSearchParamPo search
  );
  List<PurchaseReportItemVo> search(
    @Param("search") PurchaseReportSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") PurchaseReportSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") PurchaseReportSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") PurchaseReportSearchParamPo search);
  Long getIdByName(@Param("name") String name);

  List<Long> getIdsByName(@Param("list") List<String> list);

  String getNameById(@Param("id") Long id);

  List<Map<String, Object>> getNameByIds(@Param("ids") List<Long> ids);
  PurchaseReportVo selectVoById(@Param("id") Long id);
  /**
   * 产品 总数
   */
  int ProductTotal(@Param("params") PurchaseReportProductParams params);
  /**
   * 产品（分页）
   */
  Page<PurchaseReportProductResult> productPage(
    @Param("page") Page page,
    @Param("params") PurchaseReportProductParams params
  );

  /**
   * 产品合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map productSummary(@Param("params") PurchaseReportProductParams params);

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> productwid();

  /**
   * 查询店铺下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> productshopId();

  /**
   * 查询供应商下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> productsupplierId();

  /**
   * 查询采购员下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> productbuyer();

  /**
   * 供应商 总数
   */
  int SupplierTotal(@Param("params") PurchaseReportSupplierParams params);
  /**
   * 供应商（分页）
   */
  Page<PurchaseReportSupplierResult> supplierPage(
    @Param("page") Page page,
    @Param("params") PurchaseReportSupplierParams params
  );

  /**
   * 供应商合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map supplierSummary(@Param("params") PurchaseReportSupplierParams params);

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> supplierwid();

  /**
   * 查询供应商下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> suppliersupplierId();

  /**
   * 查询采购员下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> supplierbuyer();

  /**
   * 采购员 总数
   */
  int BuyerTotal(@Param("params") PurchaseReportBuyerParams params);
  /**
   * 采购员（分页）
   */
  Page<PurchaseReportBuyerResult> buyerPage(
    @Param("page") Page page,
    @Param("params") PurchaseReportBuyerParams params
  );

  /**
   * 采购员合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map buyerSummary(@Param("params") PurchaseReportBuyerParams params);

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> buyerwid();

  /**
   * 查询采购员下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> buyerbuyer();
}
